package org.example.spirngmvcdemo.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.spirngmvcdemo.model.Message;

import java.util.List;

@Mapper
public interface MessageMapper {

    @Insert("insert into message_info(`from`, `to`, message) values(#{from}, #{to}, #{message})")
   Integer insert(Message message);

    @Select("select * from message_info where delete_flag!=1")
    List<Message> queryMessage();
}
